import App from './App'
import Vue from 'vue'
import api from '@/common/api.js'

import renCustomerNavigator from '@/components/ren-customer-navigator/ren-customer-navigator.vue'
import VueCompositionAPI from '@vue/composition-api'
Vue.use(VueCompositionAPI)
// vue2
Vue.component('ren-customer-navigator', renCustomerNavigator)

Vue.prototype.$eventBus = new Vue()
Vue.config.productionTip = false
Vue.prototype.$api = api

import operate from "common/operate.js" //全局js
Vue.prototype.$operate = operate

//路由封装
import routr from './utils/routeBlocker.js'
Vue.prototype.$routr = routr

App.mpType = 'app'

// 引入全局TuniaoUI
import TuniaoUI from 'tuniao-ui'
import store from './store'
Vue.use(TuniaoUI)
let vuexStore = require('@/store/$tn.mixin.js')
Vue.mixin(vuexStore)

//引入uview
import uView from "uview-ui";
Vue.use(uView);
//地图插件
// import VueAMap from 'vue-amap';
// Vue.use(VueAMap);
// VueAMap.initAMapApiLoader({
//   key: '9d088bc4ca2846a068571ce0e0876b52',
//   plugin: ['AMap.Geolocation'],
// });

//监听主题变化
import theme from './theme/cue-theme.js'
Vue.use(theme)

const app = new Vue({
	store,
    ...App
})

import httpApi from './common/base.js'
Vue.use(httpApi, app)


app.$mount()

// import { createSSRApp } from 'vue'
// export function createApp() {
//   const app = createSSRApp(App)
//   return {
//     app
//   }
// }
